﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeBehind="ReturnGoods.aspx.cs" Inherits="dzs.Web.Outstorage.ReturnGoods" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../Scripts/JsTools.js" type="text/javascript"></script>
     <script type="text/javascript">
         function checksel() {
             if ($("#<%= GridView1.ClientID %> tr :checkbox:checked").length > 0)
                 return true;
             else
             { alert('没有选择任何行！'); return false; }

         }
    </script>
    <style>
        .tdLeft
        {
            text-align: right;
        }
        .tdRight
        {
            text-align: left;
        }
        .style1
        {
            text-align: right;
            height: 25px;
        }
        .style2
        {
            text-align: left;
            height: 25px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
        <tr>
            <td class="tdbg">
                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                    <tr>
                        <td height="25" colspan="2">
                            <b>退库操作</b>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            退库项目名称：
                        </td>
                        <td class="style2">
                            <asp:TextBox ID="txt_projectName" runat="server" Width="200px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" class="tdLeft">
                            退库物料描述：
                        </td>
                        <td height="25" class="tdRight">
                            <asp:TextBox ID="txt_materialinfo" runat="server" Width="200px"></asp:TextBox>
                            <asp:Button ID="btn_sel" runat="server" Text="查询" class="inputbutton"  CssClass="btn" OnClick="btn_sel_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td height="25" colspan="2">
                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                BorderWidth="0px" CellPadding="0" CellSpacing="1" CssClass="gv" 
                                GridLines="None" Width="100%"
                                AllowPaging="True" onpageindexchanging="GridView1_PageIndexChanging">
                                <Columns>
                                    <asp:TemplateField HeaderText="选择">
                                        <HeaderTemplate>
                                            <input id="cbo_checkAll" type="checkbox" onclick="checkall(this)" />全选
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="cbo_check" runat="server" />
                                            <asp:Label ID="lbl_mid" runat="server" Text='<%# Bind("mid") %>' 
                                                Visible="False"></asp:Label>
                                            <asp:Label ID="lbl_inid" runat="server" Text='<%# Bind("inid") %>' 
                                                Visible="False"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="退库数量">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_returnCount" runat="server" Width="50px"></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="项目编号">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("proid") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_proid" runat="server" Text='<%# Bind("proid") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="项目名称">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("projectName") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_projectName" runat="server" 
                                                Text='<%# Bind("projectName") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="物料描述">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("material") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_material" runat="server" Text='<%# Bind("material") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="单位">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("unit") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_unit" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="入库量">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("innum") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_instoreNums" runat="server" Text='<%# Bind("innum") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="nums" HeaderText="库存量" />
                                </Columns>
                                <PagerStyle CssClass="mypager" />
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" colspan="2" style="text-align: left; margin-bottom: 10px; margin-top: 10px;">
                            
                            退库人：<asp:TextBox ID="txt_returnName" runat="server" ></asp:TextBox>
&nbsp;退库时间：<asp:TextBox ID="txt_returnTime" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})"></asp:TextBox>
                            
                        </td>
                    </tr>
                    <tr>
                        <td height="25" colspan="2" style="text-align: center; margin-bottom: 10px; margin-top: 10px;">
                            <asp:Button ID="btn_addReturn" runat="server" Text="添加" class="inputbutton"  CssClass="btn" OnClick="btn_addReturn_Click" />
                        &nbsp;
                            <asp:Button ID="btn_re" runat="server" Text="重置" class="inputbutton"  CssClass="btn" 
                                OnClick="btn_re_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td height="25" colspan="2" style="text-align: center; margin-bottom: 10px; margin-top: 10px;">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td height="25" colspan="2" style="text-align: center; font-weight: bold; font-size: 18px;
                            margin-bottom: 10px; margin-top: 10px;">
                            退 库 清 单
                        </td>
                    </tr>
                    <tr>
                        <td height="25" colspan="2">
                            <asp:GridView ID="GridView2" runat="server" Width="100%" AutoGenerateColumns="False"
                                BorderWidth="0px" CellPadding="0" CellSpacing="1" CssClass="gv" GridLines="None">
                                <Columns>
                                    <asp:BoundField DataField="returnCount" HeaderText="退库数量" />
                                    <asp:BoundField DataField="material" HeaderText="物料描述" />
                                    <asp:BoundField DataField="unit" HeaderText="数量单位" />
                                    <asp:BoundField DataField="projectname" HeaderText="项目名称" />
                                    <asp:BoundField DataField="proid" HeaderText="项目编号" />
                                    <asp:BoundField DataField="mid" HeaderText="物料ID" Visible="False" />
                                </Columns>
                            </asp:GridView>
                        </td>
                    </tr>
                     <tr>
                        <td height="25" colspan="2" style="text-align: center; margin-bottom: 10px; margin-top: 10px;">
                            <asp:Button ID="btn_submit" runat="server" Text="提交" class="inputbutton"  CssClass="btn" 
                                OnClick="btn_submit_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td height="25" class="tdLeft">
                            &nbsp;
                        </td>
                        <td height="25" class="tdRight">
                            &nbsp;
                        </td>
                    </tr>
                </table>
</asp:Content>
